package ar.com.spsolutions.splibrary.book;

import ar.com.spsolutions.splibrary.user.User;
import ar.com.spsolutions.splibrary.user.UserBuilder;

public class BookCommentBuilder {

	private final BookComment toBuild;

	public static BookComment createInstanceForTest() {
		return new BookCommentBuilder()//
				.withText("Texto del comentario")//
				.withUser(UserBuilder.createInstanceForTest())//
				.build();
	}

	public BookComment build() {
		return this.toBuild;
	}

	public BookCommentBuilder() {
		this.toBuild = new BookComment();
	}

	public BookCommentBuilder withText(final String text) {
		this.toBuild.setText(text);
		return this;
	}

	public BookCommentBuilder withUser(final User user) {
		this.toBuild.setUser(user);
		return this;
	}

}
